3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D is designed to be easily extensible, so that you can, if necessary, add capabilities that are not part of the basic QuickDraw 3D feature set. For instance, you've already seen that QuickDraw 3D supplies two types of renderers, the wireframe and interactive renderers. The wireframe renderer creates line renderings of models, as illustrated in Figure 2 .
Figure 2 A model rendered by the wireframe renderer
The interactive renderer uses a more complex rendering algorithm that allows illumination and shading effects to be produced. Figure 3 shows the same teapot model rendered by the interactive renderer.
Figure 3 A model rendered by the interactive renderer
It's possible that some applications require even more complex rendering algorithms to render images adequately from a 3D model. For example, you might want to define a ray tracing renderer to support additional lighting effects such as reflection and refraction. In those cases, the application can define and register a custom renderer with QuickDraw 3D and then use that renderer in exactly the same way it would use any standard QuickDraw 3D renderer.
QuickDraw 3D is extensible in several ways:
In addition, QuickDraw 3D is designed to be portable to other software platforms and to support a variety of hardware accelerators:
Finally, QuickDraw 3D defines a platform-independent metafile (that is, a file format) for storing and interchanging 3D data. This metafile is intended to provide a standard format according to which applications can read and write 3D data, even applications that use 3D graphics systems other than QuickDraw 3D. QuickDraw 3D itself includes routines that you can use to read and write data in the metafile format. Apple Computer, Inc. also supplies a parser that you can use to read and write metafile data on operating systems that do not support QuickDraw 3D.
For further information about the metafile format, see 3D Metafile 1.5 Reference. This document is available online in the QuickDraw 3D 1.5 SDK.
Figure 4 shows the functional components of QuickDraw 3D.
Figure 4 The parts of QuickDraw 3D
Previous | QD3D Book | Overview | Chapter Contents | Next |